﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageTypes.aspx.cs" Inherits="CocisWeb.admin.ManageTypes" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
 <link href="../css/cont.css" rel="stylesheet" type="text/css" />
    <meta content="MSHTML 6.00.2900.5848" name="GENERATOR" />
    <script  type="text/javascript">
    function checkAdd()
    {
        var names = document.getElementById("TextBoxNames");
        

        if (names.value == "") {
            alert('请输入新增类别名称！');
            names.focus();
            return false;
        }
        else 
        {
                    return true;
               
 
        }
    }

    function checkUpdate() {
        var id = document.getElementById("TextBoxDeptId");
        var names = document.getElementById("TextBoxNames");
        

        if (id.value == "") {
            alert('请选择要修改的类别！');
            return false;

        }
        else {
            if (names.value == "") {
                alert('请输入新的类别名称！');
                names.focus();
                return false;
            }
            else {                
                    return true;              


            }

        }
    }

    function checkDelete() 
    {
        var id=document.getElementById("TextBoxDeptId");       
        if(id.value=="")
        {
            alert('请选择要删除的规格项目！');              
               return false;
        
        }
        else 
        {
              if (confirm('确认要删除吗？')) 
              {
                return true;
              }
              else
              {                    
                  return false;                   
              }
        

        }

    }
    
    
    
    
    </script>
</head>
<body style="padding-left:5px;padding-right:5px;background-image:url(../images/bg.gif);	background-repeat:repeat-x;">
 <form id="form1" runat="server">

  <table style="height:100%; width:100%;" border="0px" cellpadding="0px" cellspacing="0px">
  <tr style="background-image: url(../images/bg_header.gif); background-repeat: repeat-x; height:47px">
  <td style="width:10px;background-image: url(../images/main_hl.gif);"></td>
  <td>
     <span style="float: left; background-image: url(../images/main_hl2.gif); width: 15px; background-repeat: no-repeat; height: 47px"></span>
      <span style="padding-right: 10px; padding-left: 10px; float: left; background-image: url(../images/main_hb.gif); line-height:47px; color: white; background-repeat: repeat-x; height: 47px; text-align: center;">
      资产类别管理
      </span>
      <span style="float: left; background-image: url(../images/main_hr.gif); width: 60px; background-repeat: no-repeat; height: 47px"></span>
  </td>
  <td style="background-image: url(../images/main_hr2.gif);width:10px"></td>
  </tr>
  <tr>
  <td style="background-image: url(../images/main_ls.gif)"></td>
  <td style="padding-right: 10px; padding-left: 10px; padding-bottom: 10px; color: #566984; padding-top:10px; background-color: white;">
      <br />
      所选类别编号：<asp:TextBox ID="TextBoxDeptId" runat="server" 
                    BackColor="#CCFFFF" Width="56px"></asp:TextBox>&nbsp;&nbsp;&nbsp; 类别名称：<asp:TextBox ID="TextBoxNames"  runat="server" Width="150px"></asp:TextBox>&nbsp;所属大类：<asp:DropDownList ID="DropDownList1" runat="server">
                </asp:DropDownList>
                <asp:Label ID="Label1" runat="server" Font-Bold="True" 
                    ForeColor="#FF3300" Text="资产类别已存在！" Visible="False"></asp:Label>
                <asp:Button ID="btnAdd" runat="server" OnClientClick="javascript:if(checkAdd()){return true;}else{return false;}"
            Text="添 加" CssClass="button_normal" onclick="btnAdd_Click" />     

             &nbsp;&nbsp;<asp:Button ID="btnAlter" runat="server" OnClientClick="javascript:if(checkUpdate()){return true;}else{return false;}"
            Text="修 改" CssClass="button_normal" onclick="btnAlter_Click" />     

             &nbsp;
                <asp:Button ID="btnDelete" runat="server" OnClientClick="javascript:if(checkDelete()){return true;}else{return false;}"
            Text="删 除" CssClass="button_normal" onclick="btnDelete_Click" />     

                <br />
      <br />
      <asp:TreeView ID="TreeView1" runat="server" ShowLines="True" 
                onselectednodechanged="TreeView1_SelectedNodeChanged" 
          ExpandDepth="1">
            </asp:TreeView>
      
      <br />
      </td>
  <td style="background-image: url(../images/main_rs.gif)"></td>
  </tr>
  <tr style="background-image: url(../images/main_fs.gif); background-repeat: repeat-x;height:10px;">
  <td style="background-image: url(../images/main_lf.gif)"></td>
  <td style="background-image: url(../images/main_fs.gif)"></td>
  <td style="background-image: url(../images/main_rf.gif)"></td>
  </tr>
  </table>
  
  </form>
  
</body>
</html>